<?php

declare(strict_types=1);

namespace App\Marketing\Model;

use App\Fastapp\Model\FileTrait;
use Hyperf\Database\Model\SoftDeletes;
use Mine\MineModel;

/**
 * @property int $id 主键
 * @property int $created_by 创建者
 * @property int $updated_by 更新者
 * @property \Carbon\Carbon $created_at
 * @property \Carbon\Carbon $updated_at
 * @property string $deleted_at 删除时间
 * @property array $name
 * @property array $title 标题
 * @property string $icon icon
 * @property string $code code
 * @property int $sort 排序
 * @property int $type 1奖金2奖品
 * @property string $pool 奖池金额
 * @property string $price 价格
 * @property int $min 最小
 * @property int $max 最大
 * @property int $rate 比例
 * @property array $config 配置
 */
class MarketingBlindBox extends MineModel
{
    use SoftDeletes, FileTrait;

    /**
     * The table associated with the model.
     */
    protected ?string $table = 'marketing_blind_box';

    /**
     * The attributes that are mass assignable.
     */
    protected array $fillable = ['id', 'created_by', 'updated_by', 'created_at', 'updated_at', 'deleted_at', 'name', 'title', 'icon', 'code', 'sort', 'type', 'pool', 'price', 'min', 'max', 'rate', 'config'];

    /**
     * The attributes that should be cast to native types.
     */
    protected array $casts = ['id' => 'integer', 'created_by' => 'integer', 'updated_by' => 'integer', 'created_at' => 'datetime', 'updated_at' => 'datetime', 'name' => 'array', 'title' => 'array', 'sort' => 'integer', 'type' => 'integer', 'pool' => 'decimal:2', 'price' => 'decimal:2', 'min' => 'integer', 'max' => 'integer', 'rate' => 'integer', 'config' => 'array'];
}
